/*
 * Copyright (c) 2020 WildFireChat. All rights reserved.
 */

package com.cincc.cinccimdemo.ui.me.favorite.viewholder;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;

import com.cincc.cinccimdemo.R;
import com.cincc.im.model.CollectModel;

public class FavCompositeContentViewHolder extends FavContentViewHolder {
    TextView titleTextView;
    TextView contentTextView;

    public FavCompositeContentViewHolder(@NonNull View itemView) {
        super(itemView);
        bindViews(itemView);
    }


    private void bindViews(View itemView) {
        titleTextView = itemView.findViewById(R.id.titleTextView);
        contentTextView = itemView.findViewById(R.id.contentTextView);
    }

    @Override
    public void bind(Activity context, CollectModel item) {
        super.bind(context, item);
        // TODO: 2024/6/26
//        CompositeMessageContent compositeMessageContent = (CompositeMessageContent) item.toMessage().content;
//        titleTextView.setText(compositeMessageContent.getTitle());
//        contentTextView.setText(compositeMessageContent.compositeDigest());
    }

    @Override
    protected void onClick() {
        // TODO: 2024/6/26
//        Intent intent = new Intent(fragment.getContext(), CompositeMessageContentActivity.class);
//        intent.putExtra("message", favoriteItem.toMessage());
//        fragment.startActivity(intent);
    }
}
